package com.snaildesign.countdown.model;

import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="ADVICE"
 *     
*/
public class Advice implements Serializable {

    /** identifier field */
    private String adviceId;

    /** nullable persistent field */
    private String title;

    /** nullable persistent field */
    private String adviceDesc;

    /** nullable persistent field */
    private Date adviceDate;

    /** nullable persistent field */
    private String remarks;

    /** persistent field */
    private com.snaildesign.countdown.model.UserInfo userInfo;

    /** full constructor */
    public Advice(String adviceId, String title, String adviceDesc, Date adviceDate, String remarks, com.snaildesign.countdown.model.UserInfo userInfo) {
        this.adviceId = adviceId;
        this.title = title;
        this.adviceDesc = adviceDesc;
        this.adviceDate = adviceDate;
        this.remarks = remarks;
        this.userInfo = userInfo;
    }

    /** default constructor */
    public Advice() {
    }

    /** minimal constructor */
    public Advice(String adviceId, com.snaildesign.countdown.model.UserInfo userInfo) {
        this.adviceId = adviceId;
        this.userInfo = userInfo;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="ADVICE_ID"
     *         
     */
    public String getAdviceId() {
        return this.adviceId;
    }

    public void setAdviceId(String adviceId) {
        this.adviceId = adviceId;
    }

    /** 
     *            @hibernate.property
     *             column="TITLE"
     *             length="100"
     *         
     */
    public String getTitle() {
        return this.title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    /** 
     *            @hibernate.property
     *             column="ADVICE_DESC"
     *             length="500"
     *         
     */
    public String getAdviceDesc() {
        return this.adviceDesc;
    }

    public void setAdviceDesc(String adviceDesc) {
        this.adviceDesc = adviceDesc;
    }

    /** 
     *            @hibernate.property
     *             column="ADVICE_DATE"
     *             length="7"
     *         
     */
    public Date getAdviceDate() {
        return this.adviceDate;
    }

    public void setAdviceDate(Date adviceDate) {
        this.adviceDate = adviceDate;
    }

    /** 
     *            @hibernate.property
     *             column="REMARKS"
     *             length="200"
     *         
     */
    public String getRemarks() {
        return this.remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    /** 
     *            @hibernate.many-to-one
     *             not-null="true"
     *            @hibernate.column name="USER_ID"         
     *         
     */
    public com.snaildesign.countdown.model.UserInfo getUserInfo() {
        return this.userInfo;
    }

    public void setUserInfo(com.snaildesign.countdown.model.UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("adviceId", getAdviceId())
            .toString();
    }

}
